const http = uni.$u.http

export const login = (params, config = {dataType: 'json'}) => http.post('/app/auth/login', params, config)
export const logout = (params, config = {dataType: 'json'}) => http.post('/app/auth/logout', params, config)
export const register = (params, config = {dataType: 'json'}) => http.post('/app/auth/register', params, config)
export const sendSmsCode = (params, config = {dataType: 'json'}) => http.post('/app/auth/send-sms-code', params, config)
export const checkToken = (data) => http.get('/app/auth/check-token', data)
export const deviceInit = (params, config = {}) => http.post('/app/common/device-init', params, config)
export const memberInfo = (params, config = {custom: { auth: true }}) => http.post('/app/member/info', params, config)
export const versionInfo = (params, config = {custom: { auth: true }}) => http.post('/app/upgrade/info', params, config)